define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'sign/config/index',
        add_url: 'sign/config/add',
        edit_url: 'sign/config/edit',
        delete_url: 'sign/config/delete',
        export_url: 'sign/config/export',
        modify_url: 'sign/config/modify',
    };

    var Controller = {

        index: function () {
            ea.table.render({
                init: init,
                toolbar:['refresh'],
                cols: [[
                    {type: 'checkbox'},
                    {field: 'id', title: 'ID',search: false},
                    {field: 'name', title: '礼包名',search: false},
                    {field: 'img', title: '礼包图片',search: false,templet:ea.table.image},
                    {field: 'content', title: '礼包代码',search: false},
                    {field: 'info', title: '礼包介绍',search: false},
                    {
                        
                        title: '操作',
                        templet: ea.table.tool,
                        operat: ['edit']
                    }
                ]],
            });

            ea.listen();
        },
        add: function () {
            ea.listen();
        },
        edit: function () {
            ea.listen();
        },
    };
    return Controller;
});